/**
 *
 * @author t0909h0158	
 */
package workshop2;
/*
 * Thread
 * @author t0909h0158
 */
public class BusinessAlive implements Runnable


{
    Thread t;
    
    public BusinessAlive ()
    	{
        t = new Thread(this);
        
        System.out.println("Schedules Variance.: 0");
        
        System.out.println(t.isAlive());
        
        t.start();
    }
    public void run(){
        System.out.println("I am in the main and waiting for the business tasks to finish ");
    }
}
/*
 * Main
 * @author t0909h0158
 *
 * @param String args
 */
class BusinessDemo
{
    public BusinessDemo()
    	{
        BusinessAlive ba = new BusinessAlive();
    }

    public static void main(String[] args)
    	{
        new BusinessDemo();
        
        BusinessAlive bu = new BusinessAlive();
        
        System.out.println(bu.t.isAlive());

        bu.t.stop();
        
        System.out.println(bu.t.isAlive());

        bu.t.resume();
        
        System.out.println(bu.t.isAlive());
    }
}
